package com.hjy.cabinet.ws.domain.ws;


public class WbsocketResponseBody {
    private String status;

    private String msg;

    private Object data;

    private String clientIp;

    private String methodName;

    private String connId;

    public String getConnId() {
        return connId;
    }

    public void setConnId(String connId) {
        this.connId = connId;
    }

    public WbsocketResponseBody(String status, Object data) {
        this.status = status;
        this.data = data;
    }

    public WbsocketResponseBody(String status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public static WbsocketResponseBody success(Object data) {
        return new WbsocketResponseBody("success", data);
    }


    public static WbsocketResponseBody error(String msg) {
        return new WbsocketResponseBody("failed", msg);
    }

    public WbsocketResponseBody() {
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    @Override
    public String toString() {
        return "WbsocketResponseBody{" +
                "status='" + status + '\'' +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                ", clientIp='" + clientIp + '\'' +
                ", methodName='" + methodName + '\'' +
                ", connId='" + connId + '\'' +
                '}';
    }
}
